package com.twu.biblioteca.dao;

import com.twu.biblioteca.IMovieDao;
import com.twu.biblioteca.modal.Movie;

import java.util.ArrayList;
import java.util.List;

public class MemoryMovieDao implements IMovieDao {

    private List<Movie> movies;

    public MemoryMovieDao() {
        movies = new ArrayList<Movie>();
        movies.add(new Movie(1, "Noah", 2014, "Jennifer Connelly", 6.4));
        movies.add(new Movie(2, "Winter’s Tale", 2013, "Colin Farrell", 6.2));
    }

    @Override
    public List<Movie> getMovies() {
        return movies;
    }
}
